<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" charset="utf-8" src="/resource/js/jquery-1.7.2.min.js"></script>
</head>
<body>
	<form id="itemAddForm" class="itemForm" method="post">
		店铺名称：<input name="name" value="" type="text"></input>
		<button type="submit" onclick="submitForm()">提交</button>
	</form>
</body>
<script type="text/javascript">
	//提交表单
	function submitForm(){
		/* $.post("/shop/save",$("#itemAddForm").serialize(), function(data){
			if(data.status == 200){
				alert('提示','新增店铺成功!');
			}
		}); */
		
		$.ajax({
	    	 type: 'POST',
			  url: "/cart/save",
			  data: $("#itemAddForm").serialize(),
			  success:function(data){
				  if(data.status == 200){
						alert('提示','新增店铺成功!');
						return false;
					}
			  },
			  error:function(){
			  }
	    });
	}
</script>
</html>